package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.ProductStock;
import cn.wolfcode.crm.domain.Role;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface ProductStockMapper {

    int insert(ProductStock record);

    List<ProductStock> selectAll();

    int updateByPrimaryKey(ProductStock record);

    //根据商品ID和库存ID查询库存信息
    ProductStock selectByProductAndDepot(@Param("productId") Long productId,
                                         @Param("depotId") Long depotId);

    List<ProductStock> query(QueryObject qo);
    Integer count(QueryObject qo);
    Integer countByStoreNumber(BigDecimal storeNumber);
}